<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        let fn = prompt(`请输入秒数`)
        function getTime(t) {
            let h = parseInt(t / 60 / 60 % 24)
            let m = parseInt(t / 60 % 60)
            let s = parseInt(t % 60)
            if (h >= 0 && h <= 9) {
                h = '0' + h
            }
            if (m >= 0 && m <= 9) {
                m = '0' + m
            }
            s < 10 ? '0' + s : s
            return `${h}时${m}分${s}秒`
        }
        let fu = getTime(fn)
        document.write(fu)
    </script>
</body>

</html>